﻿using Core.Domain.Customers;
using System.Data.Entity.ModelConfiguration;

namespace Data.Mapping.Customers
{
    public partial class EducationMap : EntityTypeConfiguration<Education>
    {
        public EducationMap()
        {
            this.ToTable("Education");
            this.HasKey(c => c.Id);
            this.Property(u => u.Name).HasMaxLength(100);
            this.Property(u => u.Specialty).HasMaxLength(100);
            
            this.HasRequired(rr => rr.Resume)
                .WithMany(c => c.Education)
                .HasForeignKey(rr => rr.ResumeId);
        }
    }
}
